var i = require("../../../uv-ui-tools/libs/mixin/mpMixin.js"), t = require("../../../uv-ui-tools/libs/mixin/mixin.js"), e = require("../../../../common/vendor.js");

require("../../../uv-ui-tools/libs/function/index.js"), require("../../../uv-ui-tools/libs/function/test.js"), 
require("../../../uv-ui-tools/libs/function/digit.js"), require("../../../uv-ui-tools/libs/util/route.js"), 
require("../../../uv-ui-tools/libs/function/debounce.js"), require("../../../uv-ui-tools/libs/function/throttle.js");

var n = {
    name: "uv-index-item",
    mixins: [ i.mpMixin, t.mixin ],
    data: function() {
        return {
            top: 0,
            height: 0,
            id: ""
        };
    },
    created: function() {
        this.anchor = {};
    },
    mounted: function() {
        this.init();
    },
    methods: {
        init: function() {
            var i = this;
            if (this.getParentData("uv-index-list"), !this.parent) return this.$uv.error("uv-index-item必须要搭配uv-index-list组件使用");
            this.$uv.sleep().then(function() {
                i.getIndexItemRect().then(function(t) {
                    i.top = Math.ceil(t.top), i.height = Math.ceil(t.height);
                });
            });
        },
        getIndexItemRect: function() {
            var i = this;
            return new Promise(function(t) {
                i.$uvGetRect(".uv-index-item").then(function(i) {
                    t(i);
                });
            });
        }
    }
}, u = e._export_sfc(n, [ [ "render", function(i, t, n, u, o, r) {
    return {
        a: "uv-index-item-".concat(o.id),
        b: e.n("uv-index-item-".concat(o.id))
    };
} ], [ "__scopeId", "data-v-05dd4069" ] ]);

wx.createComponent(u);